-- GENERATED SPELL FOR [Underbog Shambler] --


function spell0_17871(pUnit, Event) --@Allergies,n/a--
pUnit:FullCastSpellOnTarget(31427,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17871', 550, 1)
end

function spell1_17871(pUnit, Event) --@Fungal Regrowth,n/a--
pUnit:FullCastSpellOnTarget(34163,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17871', 23000, 1)
end

function spell2_17871(pUnit, Event) --@Fungal Regrowth,n/a--
pUnit:FullCastSpellOnTarget(37967,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17871', 23000, 1)
end

function spell3_17871(pUnit, Event) --@Itchy Spores,n/a--
pUnit:FullCastSpellOnTarget(32329,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17871', 12000, 1)
end

function spell4_17871(pUnit, Event) --@Itchy Spores,n/a--
pUnit:FullCastSpellOnTarget(37965,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17871', 10000, 1)
end

function Sorts_17871(pUnit, Event)
local choix_sorts_17871 = math.random(0, 4)
if choix_sorts_17871 == 0 then
pUnit:RegisterEvent('spell0_17871', 1, 1)
end
if choix_sorts_17871 == 1 then
pUnit:RegisterEvent('spell1_17871', 1, 1)
end
if choix_sorts_17871 == 2 then
pUnit:RegisterEvent('spell2_17871', 1, 1)
end
if choix_sorts_17871 == 3 then
pUnit:RegisterEvent('spell3_17871', 1, 1)
end
if choix_sorts_17871 == 4 then
pUnit:RegisterEvent('spell4_17871', 1, 1)
end
end

function mob17871_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17871', math.random(1500, 3000), 1)
end

function mob17871_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17871_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17871_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17871, 1, 'mob17871_Action')
RegisterUnitEvent(17871, 2, 'mob17871_Leave')
RegisterUnitEvent(17871, 3, 'mob17871_Kill')
RegisterUnitEvent(17871, 4, 'mob17871_Die')
